package com.pac.weixin.dao.impl;

import java.util.List;

import org.mybatis.spring.SqlSessionTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import com.pac.weixin.bean.WxDoctorSelBean;
import com.pac.weixin.dao.WxDoctorSelDao;

/**
 * 微信选择医生dao实现
 * 
 * @author lujun.chen
 * @version [版本号, 2015年2月28日]
 * @see [相关类/方法]
 * @since [产品/模块版本]
 */
@Repository(value = "wxDoctorSelDao")
public class WxDoctorSelDaoImpl implements WxDoctorSelDao {

	@Autowired
	private SqlSessionTemplate sqlSessionTemplate;

	@Override
	public boolean addWxDoctorSel(WxDoctorSelBean wxDoctorSelBean) {
		int n = sqlSessionTemplate.insert("addWxDoctorSel", wxDoctorSelBean);
		return n > 0;
	}

	@Override
	public boolean delWxDoctorSel(WxDoctorSelBean wxDoctorSelBean) {
		int n = sqlSessionTemplate.insert("delWxDoctorSel", wxDoctorSelBean);
		return n > 0;
	}

	@Override
	public List<WxDoctorSelBean> queryWxDoctorSel(
			WxDoctorSelBean wxDoctorSelBean) {
		return sqlSessionTemplate.selectList("queryWxDoctorSel",
				wxDoctorSelBean);
	}

}
